package com.roc.service;

import java.util.List;
import java.util.Map;

import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;

import com.roc.bean.AgentSubsidyBean;
import com.roc.bean.BlackListBean;
import com.roc.bean.ChangeAgentCountBean;
import com.roc.bean.ChangeCheckCountBean;
import com.roc.bean.CommNumberStatBean;
import com.roc.bean.ErrorCountBean;
import com.roc.bean.FreezeBean;
import com.roc.bean.MerDetailForysBean;
import com.roc.bean.MerchantsChangeRecordBean;
import com.roc.bean.MerinfoSearchBean;
import com.roc.bean.MerinfoTermBean;
import com.roc.bean.OrgSettlementBean;
import com.roc.bean.ReviseMerinfoBean;
import com.roc.bean.RiskYsbEstrnInfoBean;
import com.roc.bean.TblMgmRiskBackLog;
import com.roc.bean.TermActForYsbBean;
import com.roc.bean.TermBean;
import com.roc.pojo.AccountingStatistics;
import com.roc.pojo.AuditingItem;
import com.roc.pojo.BlackList;
import com.roc.pojo.CalcuBean;
import com.roc.pojo.CompTransCount;
import com.roc.pojo.DayStastics;
import com.roc.pojo.Estrnlog;
import com.roc.pojo.MerchantReport;
import com.roc.pojo.MerinfoChange;
import com.roc.pojo.Negotiation;
import com.roc.pojo.Operators;
import com.roc.pojo.SettingBean;
import com.roc.pojo.TblActSum;
import com.roc.pojo.TblClearTxn;
import com.roc.pojo.TblMchtInf;
import com.roc.pojo.TblSettleItem;
import com.roc.pojo.TblTerActivateStatistics;
import com.roc.pojo.TblTermBrandStatistics;
import com.roc.pojo.TblTfrHisTrnLog;
import com.roc.pojo.TblTfrTrnLog;
import com.roc.pojo.TblTransJnlsSettle;
import com.roc.pojo.TransSum;
import com.roc.pojo.UnPay;
import com.roc.pojo.UnPayStatement;
import com.roc.pojo.WindControllSta;
import com.roc.pojo.susesMerinfo;
import com.roc.web.action.merchangerecord.MerchantsChangeRecordSearchCondition;
import com.roc.web.action.reviseMerinfo.ReviseMerinfoSearchCondition;
import com.roc.web.action.windcontroll.OrderProcessSearchCondition;

/**
 * @author zbl
 * @date 20140828
 * */
public interface IExcelService {
	// 历史交易excel
	HSSFWorkbook hisTransQueryExcel(String startDate, String endDate, String mid)
			throws ServiceException;

	HSSFWorkbook settingTransQueryExcel(List<CalcuBean> calcuList,
			String startDate, String endDate) throws ServiceException;

	HSSFWorkbook merinfoTransQueryExcel(List<MerinfoSearchBean> merinfoList,
			Operators op) throws ServiceException;

	HSSFWorkbook settingTotalListTransQueryExcel(List<SettingBean> settingList,
			String startDate, String endDate) throws ServiceException;

	HSSFWorkbook estransQueryExcel(List<Estrnlog> estransList, String date)
			throws ServiceException;

	HSSFWorkbook duiZhangQueryExcel(List<Object> searchRsList,
			String startDate, String endDate) throws ServiceException;

	HSSFWorkbook susMerinfoExcel(List<susesMerinfo> sList)
			throws ServiceException;

	HSSFWorkbook blackListExcel(List<BlackList> sList) throws ServiceException;

	HSSFWorkbook daiLIExcel(List<MerchantReport> sList, String startDate,
			String endDate) throws ServiceException;
	

	/**
	 * 导出分润明细
	 * 
	 * @param searchRsList
	 * @return
	 * @throws ServiceException
	 */
	public HSSFWorkbook proFitShareDetailExcel(List<Object> searchRsList,
			String minDate, String maxDate, Operators op)
			throws ServiceException;

	/**
	 * 导出交易流水
	 * 
	 * @param tftList
	 * @param resMap 
	 * @param tranDate
	 * @return
	 */

	public SXSSFWorkbook  exportTransFlow(List<TblTfrTrnLog> tftList,
			String minDate,String maxDate, Map<String, String> resMap,Operators op) throws ServiceException;

	/**
	 * 导出 代付流水
	 * 
	 * @param date
	 *            数据
	 * @param op
	 *            操作人
	 * @param conditions
	 *            查询条件
	 * @return
	 * @throws ServiceException
	 */

	HSSFWorkbook exportNegotiation(List<Negotiation> date, Operators op,
			List<String> conditions) throws ServiceException;

	HSSFWorkbook clearTransQueryExcel(List<TblClearTxn> clearList,
			String startDate, String endDate) throws ServiceException;

	
	HSSFWorkbook statisticsAgentTransQueryExcel(List<Operators> operList,
			String startDate, String endDate) throws ServiceException;
	
	HSSFWorkbook statisticsAgentAreaTransQueryExcel(List<Operators> operList,
			String startDate, String endDate) throws ServiceException;
	
	HSSFWorkbook statisticsMerinfoTransQueryExcel(List<TblMchtInf> mchtList,
			String startDate, String endDate) throws ServiceException;

	HSSFWorkbook exportMerinfoTransQueryExcel(List<TblMchtInf> mchtList,
			String startDate, String endDate) throws ServiceException;

	HSSFWorkbook exportAgentQueryInfoExcel(List<Object> operList,
			String startDate, String endDate,String invoiceRateFlag) throws ServiceException;
	/**
	 * 导出结算流水
	 * @param posserList
	 * @param minDate
	 * @param maxDate
	 * @return
	 * @throws ServiceException
	 */
	HSSFWorkbook exportSettlementFlow(List<TblTransJnlsSettle> posserList, String minDate,String maxDate)
			throws ServiceException;
	
	/**
	 * 导出驳回商户详情
	 * @param auditList
	 * @param startingDate
	 * @param endDate
	 * @return
	 * @throws Exception
	 */
	HSSFWorkbook exportRejectedMerinfoList(List<AuditingItem> auditList,
			String startingDate, String endDate) throws Exception;
	
	/**
	 * 导出风控审核统计数据
	 * @param wcsList
	 * @param startingDate
	 * @param endDate
	 * @return
	 * @throws Exception
	 */
	HSSFWorkbook exportWindControllStaList(List<WindControllSta> wcsList,
			String startingDate, String endDate) throws Exception;
	
	/**
	 * 终端激活统计
	 * @param termList
	 * @param startingDate
	 * @param endDate
	 * @return
	 * @throws Exception
	 */
	SXSSFWorkbook exportTerminalStaList(List<TermBean> termList,
			String startingDate, String endDate,String status) throws Exception;
	/**
	 * 导出未成功导入的商户信息
	 * @param noImportList
	 * @return
	 */
	HSSFWorkbook exportNoImportedMerList(Map<String,Object> resultMap) throws Exception;
	
	/**
	 * 导出历史交易记录
	 * @param tftList
	 * @param minDate
	 * @param maxDate
	 * @param resMap 
	 * @return
	 */
	public SXSSFWorkbook exportHisTransFlow(List<TblTfrHisTrnLog> tftList,
			String minDate, String maxDate, Map<String, String> resMap,Operators op) throws Exception;
	
	/**
	 * 风控历史交易查询导出
	 * @param tftList
	 * @param minDate
	 * @param maxDate
	 * @return
	 * @throws Exception
	 */
	public SXSSFWorkbook exportHisRiskTransFlow(List<TblTfrHisTrnLog> tftList,
			String minDate, String maxDate) throws Exception;

	/**
	 * 导出交易统计详情
	 * @param tftList
	 * @param minDate
	 * @param maxDate
	 * @param summaryMap
	 * @return
	 */
	SXSSFWorkbook exportTransStastics(List<TblTfrTrnLog> tftList,
			String minDate, String maxDate, Map<String, String> summaryMap) throws Exception;
    /**
     * 导出代理商信息匹配
     * @Title: exportAgencyExcel
     * @Description: TODO
     * @param @param map
     * @param @return
     * @param @throws Exception    
     * @return HSSFWorkbook    
     * @throws
     */
	HSSFWorkbook exportAgencyExcel(Map<String,Object> map) throws Exception;
	
	/**
	 * 按审核通过时间区间导出结算信息
	 * @param merinfoChagenList
	 * @param startDate
	 * @param endDate
	 * @return
	 * @throws Exception
	 */
	HSSFWorkbook exportMerinfoChangeC2Info(List<MerinfoChange> merinfoChagenList, String startDate,
	            String endDate)  throws Exception;

	/**
	 * 导出商户查询
	 * @param tftList
	 * @param minDate
	 * @param maxDate
	 * @return
	 */
	public HSSFWorkbook exportmerinfoList(List<MerinfoSearchBean> merfList) throws Exception;

	/**
	 * 终端sn号段绑定统计
	 * @param termList
	 * @param startingDate
	 * @param endDate
	 * @return
	 * @throws Exception
	 */
	SXSSFWorkbook exportTerminalSnBatchStaList(List<TblTermBrandStatistics> termList,Map<String, Map<String, String>> snStaMap,
			String startingDate, String endDate,String status,Operators logingMerchant) throws Exception;
	/**
	 * 强扣登记导出Excel
	 * @param freezeList
	 * @return
	 * @throws Exception
	 */
	SXSSFWorkbook exportFreezeMcht(List<FreezeBean> freezeList) throws Exception;
	
	/**
	 * 导出清结算管理结算信息
	 * @param settleList
	 * @param minDate
	 * @param maxDate
	 * @return
	 */
	SXSSFWorkbook exportSettlementMsgFlow(List<TblTransJnlsSettle> settleList,
			String minDate, String maxDate,List<String> amtList) throws ServiceException;

	/**
	 * 银联直连商户交易报表
	 * @param unlist
	 * @return
	 * @throws Exception
	 */
	SXSSFWorkbook exportUnpayMcht(List<UnPayStatement> unlist) throws Exception;

	/**
	 * 银联直连商户信息
	 * @param list
	 * @return
	 * @throws Exception
	 */
	SXSSFWorkbook exportUnpay(List<UnPay> list) throws Exception;
	/**
	 * 导出出款申请信息
	 * @param settleItemList
	 * @return
	 * @throws Exception
	 */
	SXSSFWorkbook exportApplyMoneyList(List<TblSettleItem> settleItemList) throws Exception;
    /**
     * 导出黑名单
     * @Title: exportBlackList
     * @Description: TODO
     * @param @param blackList
     * @param @param minDate
     * @param @param maxDate
     * @param @return    
     * @return SXSSFWorkbook    
     * @throws
     */
	SXSSFWorkbook exportBlackList(List<BlackListBean> blackList,String minDate, String maxDate)throws Exception;

	/**
	 * 终端sn号段激活统计
	 * @param termList
	 * @param startingDate
	 * @param endDate
	 * @return
	 * @throws Exception
	 */
	SXSSFWorkbook exportTermActivateStaList(List<TblTerActivateStatistics> termList,Map<String, Map<String, String>> snStaMap,
			String startingDate, String endDate, String effectAct,Operators logingMerchant) throws Exception;	

	/**
	 * 自营终端激活统计
	 * @param termList
	 * @param startingDate
	 * @param endDate
	 * @return
	 * @throws Exception
	 */
	SXSSFWorkbook exportTermSelfSupportActivateStaList(List<TblTerActivateStatistics> termList,Map<String, Map<String, String>> snStaMap,
			String effectAct , Operators logingMerchant) throws Exception;
	
	
	/**
	 * 变更审核统计导出
	 * @Title: exportChangeCheckList
	 * @Description: TODO
	 * @param @param ccList
	 * @param @param startingDate
	 * @param @param endDate
	 * @param @return
	 * @param @throws Exception    
	 * @return HSSFWorkbook    
	 * @throws
	 */
	HSSFWorkbook exportChangeCheckList(List<ChangeCheckCountBean> ccList,
			String minDate, String endDate) throws Exception;
    /**
     * 变更审核统计导出--- 代理商
     * @Title: exportChangeCheckAgentList
     * @Description: TODO
     * @param @param ccList
     * @param @param minDate
     * @param @param maxDate
     * @param @return    
     * @return HSSFWorkbook    
     * @throws
     */
	HSSFWorkbook exportChangeCheckAgentList(List<ChangeAgentCountBean> ccList,String statDate, String endDate)
	throws Exception;
	
	/**
	 * 导出占比统计数据
	 * @param asList
	 * @param transDt
	 * @return
	 * @throws Exception
	 */
	SXSSFWorkbook exportAccountStaList(List<AccountingStatistics> asList,
			String transDt) throws ServiceException;
	/**
	 * 代理商补贴导出
	 * @Title: exportAgentSubsidyList
	 * @Description:TODO(...)
	 * @see <p></p>
	 * @param agent
	 * @param minDate
	 * @param endDate
	 * @return
	 * @throws Exception
	 * @author JD
	 * @date: 2017年7月20日 下午2:53:36
	 *
	 */
	HSSFWorkbook exportAgentSubsidyList(List<AgentSubsidyBean> agent) throws Exception;
	
	/**
	 * 导出差错列表
	 * @param searchRsList
	 * @return
	 * @throws ServiceException
	 */
	SXSSFWorkbook exportOrderProcessList(List<Object> searchRsList) throws ServiceException;
 
	/**
	 * 导出差错列表
	 * @param agent
	 * @return
	 * @throws Exception
	 */

 
	public SXSSFWorkbook exportErrorCountList(List<ErrorCountBean> sList , OrderProcessSearchCondition searchCondition)throws ServiceException;;

	/**
	 * 导出差错交易统计
	 * @param agent
	 * @return
	 * @throws Exception
	 */
	
	SXSSFWorkbook exErrorCountList(List<ErrorCountBean> sList,
			String minDate, String maxDate)throws Exception;

	/**
	 * 导出整改商户数据
	 * @param agent
	 * @return
	 * @throws Exception
	 */
	HSSFWorkbook exportReviseDataExcel(Map<String, Object> resultMap) throws ServiceException;

	SXSSFWorkbook exErrorCountList(List<Object> searchRsList)
			throws ServiceException;

	
	/**
	 * 导出整改商户数据 第2版
	 * @param agent
	 * @return
	 * @throws Exception
	 */
	HSSFWorkbook exportReviseMerinfoList(List<ReviseMerinfoBean> revList,ReviseMerinfoSearchCondition searchCondition)throws ServiceException;
	
	/**
	 * 导出汇出信息
	 * @param settleItemList
	 * @return
	 * @throws Exception
	 */
	public SXSSFWorkbook exportTempList(List<TblSettleItem> settleItemList) throws Exception;

	/**
	 * 导出商终明细
	 * @Title: exportMerinfoTermList
	 * @Description:TODO(...)
	 * @see <p></p>
	 * @param ccList
	 * @param minDate
	 * @param maxDate
	 * @return
	 * @author JD
	 * @date: 2017年11月14日 上午10:10:10
	 *
	 */
	HSSFWorkbook exportMerinfoTermList(List<MerinfoTermBean> ccList,String minDate, String maxDate) throws ServiceException;

	/**
	 * 导出商户数量统计
	 * @return
	 * @author JC
	 * @date: 2018年1月29日
	 *
	 */
	SXSSFWorkbook exportCommNumber(List<CommNumberStatBean> ccList,String MinDate,String MaxDate) throws ServiceException;
	
	/**
	 * 导出连续15天无交易商户信息
	 * @param noEstrnList
	 * @return
	 * @throws Exception
	 */
	SXSSFWorkbook exportNoEstrnMerchantInfo(List<Object> noEstrnList) throws Exception;

	
	/**
	 * 导出仓库Sn统计信息
	 * @param wareHouList
	 * @return
	 * @throws Exception
	 */
	SXSSFWorkbook exportWareHouSnStatics(List<Object> wareHouList) throws Exception;
	
	
	/**
	 * 导出日报表数据
	 * @param staList
	 * @param minDate
	 * @param maxDate
	 * @param resMap 
	 * @return
	 */
	SXSSFWorkbook exportDayStasticsList(List<DayStastics> staList,
			String minDate, String maxDate, Map<String, String> resMap) throws ServiceException;
	/**
	 * 导出分公司交易统计
	 * @Title: exportCompTransList
	 * @Description:TODO(...)
	 * @see <p></p>
	 * @param staList
	 * @param minDate
	 * @param maxDate
	 * @return
	 * @author JD
	 * @date: 2017年12月4日 下午3:34:03
	 *
	 */
	SXSSFWorkbook exportCompTransList(List<CompTransCount> staList,
			String minDate, String maxDate)throws ServiceException;

	/**
	 * 导出机构出款申请信息
	 * @param settleItemList
	 * @return
	 * @throws Exception
	 */
	SXSSFWorkbook exportOrgApplyMoneyList(List<OrgSettlementBean> settleItemList) throws Exception;
	
	/**
	 * 导出云商宝历史交易记录
	 * @param tftList
	 * @param minDate
	 * @param maxDate
	 * @param resMap 
	 * @return
	 */
	public SXSSFWorkbook exportYsbHisTransFlow(List<TblTfrHisTrnLog> tftList,
			String minDate, String maxDate, Map<String, String> resMap,String roleType) throws Exception;
	
	/**
	 * 导出云商宝交易流水
	 * 
	 * @param tftList
	 * @param resMap 
	 * @param tranDate
	 * @return
	 */

	public SXSSFWorkbook  exportYsbTransFlow(List<TblTfrTrnLog> tftList,
			String minDate,String maxDate, Map<String, String> resMap,String roleType) throws ServiceException;

	
	
	/**
	 * 云商宝商户详情导出
	 * @param merinfoList
	 * @param minDate
	 * @param maxDate
	 * @return
	 * @throws Exception
	 */
	public SXSSFWorkbook exportYsbMerDetaiList(List<MerDetailForysBean> merinfoList,
			String minDate, String maxDate) throws Exception;
	
	/**
	 * 云商宝激活终端统计
	 * @param termActForYsbList
	 * @return
	 * @throws Exception
	 */
	public SXSSFWorkbook exportYsbTermActList(List<TermActForYsbBean> termActForYsbList) throws Exception;
    
	/**
	 * 云商宝交易信息统计
	 * @param merinfoList
	 * @param minDate
	 * @param maxDate
	 * @return
	 * @throws Exception
	 */
	HSSFWorkbook ysbTermianlTransStaticsList(List<Object> list, String startingDate, String endDate)
			throws Exception;
	
	
	/**
	 * 云商宝商户变更记录导出
	 * @param mcrList
	 * @param searchCondition
	 * @return
	 * @throws Exception
	 */
	public HSSFWorkbook exportMerchantsChangeRecordList(List<MerchantsChangeRecordBean> mcrList,MerchantsChangeRecordSearchCondition searchCondition)throws Exception;
	
	/**
	 * 导出云商宝商户交易统计
	 * @param transSumList
	 * @param minDate
	 * @param maxDate
	 * @return
	 */
	public SXSSFWorkbook exportTransSumList(List<TblActSum> transSumList,
			String minDate, String maxDate) throws Exception;


	/**
	 * 导出终端信息
	 * @param termList 终端信息
	 * @return
	 * @throws ServiceException
	 */
	HSSFWorkbook excelTerminalQuery(List<TermBean> termList) throws ServiceException;
     /**
      * 导出云商宝交易信息查询 - 风控人员
      * @Title: exportRiskYsbHisTransFlow
      * @param tftList
      * @param minDate
      * @param maxDate
      * @param roleType
      * @return
      * @author JD
      * @date: 2018年4月16日 
      *
      */
	SXSSFWorkbook exportRiskYsbHisTransFlow(List<RiskYsbEstrnInfoBean> tftList, String minDate, String maxDate,String roleType) throws ServiceException;
    /**
     * 导出退货金明细
     * @Title: exportMarginAndReturnDetails
     * @param riskList
     * @return
     * @throws ServiceException
     * @author JD
     * @date: 2018年4月24日 
     *
     */
	SXSSFWorkbook exportMarginAndReturnDetails(List<TblMgmRiskBackLog> riskList)throws ServiceException;
}
